public class test {
    public static int[] orderArray(){
        int[] array = new int[11];
        for (int i = 0; i <array.length ; i++) {
            array[i] = array.length-i;
        }
        return array;
    }
    //插入排序
    public static void testInsert(int[] array){
        Sort s = new Sort();
        s.insertSort(array);
    }
    //希尔排序
    public static void testShell(int[] array){
        Sort s = new Sort();
        s.shellSort(array);
    }
    //选择排序
    public static void testSelect1(int[] array){
        Sort s = new Sort();
        s.selectSort1(array);
    }
    public static void testSelect2(int[] array){
        Sort s = new Sort();
        s.selectSort2(array);
    }
    public static void testSelect3(int[] array){
        Sort s = new Sort();
        s.selectSort3(array);
    }
    //堆排序
    public static void testHeapSort(int[] array) {
        Sort s = new Sort();
        long startTime = System.currentTimeMillis();
        s.heapSort (array);
        long endTime = System.currentTimeMillis();
        System.out.println("堆排序耗时："+(endTime-startTime));
    }
    //快排
    public static void quickSort(int[] array){
        Sort s = new Sort();
        s.quickSort(array);
    }
    public static void quickNorSort(int[] array){
        Sort s = new Sort();
        s.quickNor(array,0,array.length-1);
    }
    public static void main(String[] args){
        int[] array = orderArray();
        quickNorSort(array);
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]+" ");
        }
    }
}
